<?php 
	include_once 'thuvienham.php';
	include_once 'hoadon_db.php';

	class hoadon_bs 
	{
		//------------------Fields [8]------------------
			// #0
		private $MaHoaDon = -1;
		public function SetMaHoaDon($MaHoaDon)           { $this->MaHoaDon = $MaHoaDon;           }
		public function GetMaHoaDon()                    { return $this->MaHoaDon;                }
			// #1
		private $MaQuyenHoaDon = -1;
		public function SetMaQuyenHoaDon($MaQuyenHoaDon) { $this->MaQuyenHoaDon = $MaQuyenHoaDon; }
		public function GetMaQuyenHoaDon()               { return $this->MaQuyenHoaDon;           }
			// #2
		private $MaNguoiDung = "";
		public function SetMaNguoiDung($MaNguoiDung)     { $this->MaNguoiDung = $MaNguoiDung;     }
		public function GetMaNguoiDung()                 { return $this->MaNguoiDung;             }
			// #3
		private $MaHocVien = "";
		public function SetMaHocVien($MaHocVien)         { $this->MaHocVien = $MaHocVien;         }
		public function GetMaHocVien()                   { return $this->MaHocVien;               }
			// #4
		private $NgayLap = "0000-00-00";
		public function SetNgayLap($NgayLap)             { $this->NgayLap = $NgayLap;             }
		public function GetNgayLap()                     { return $this->NgayLap;                 }
			// #5
		private $MaChuongTrinh = "";
		public function SetMaChuongTrinh($MaChuongTrinh) { $this->MaChuongTrinh = $MaChuongTrinh; }
		public function GetMaChuongTrinh()               { return $this->MaChuongTrinh;           }
			// #6
		private $ThanhTien = -1;
		public function SetThanhTien($ThanhTien)         { $this->ThanhTien = $ThanhTien;         }
		public function GetThanhTien()                   { return $this->ThanhTien;               }
			// #7
		private $PIN = "";
		public function SetPIN($PIN)                     { $this->PIN = $PIN;                     }
		public function GetPIN()                         { return $this->PIN;                     }

		//------------------Method------------------
		public function Them()
		{
			$data = new hoadon_db();
			return $data->Them($this->MaHoaDon, $this->MaQuyenHoaDon, $this->MaNguoiDung, $this->MaHocVien, $this->NgayLap, $this->MaChuongTrinh, $this->ThanhTien, $this->PIN);
		}

		public function Xoa()
		{
			$data = new hoadon_db();
			return $data->Xoa($this->MaHoaDon);
		}

		public function CapNhat()
		{
			$data = new hoadon_db();
			return $data->CapNhat($this->MaHoaDon, $this->MaQuyenHoaDon, $this->MaNguoiDung, $this->MaHocVien, $this->NgayLap, $this->MaChuongTrinh, $this->ThanhTien, $this->PIN);
		}

		public function LayDanhSach()
		{
			$data = new hoadon_db();
			return $data->LayDanhSach($this->MaHoaDon, $this->MaQuyenHoaDon, $this->MaNguoiDung, $this->MaHocVien, $this->NgayLap, $this->MaChuongTrinh, $this->ThanhTien, $this->PIN);
		}
		public function LayDanhSachPaging($Start, $Limit)
		{
			$data = new hoadon_db();
			return $data->LayDanhSachPaging($this->MaHoaDon, $this->MaQuyenHoaDon, $this->MaNguoiDung, $this->MaHocVien, $this->NgayLap, $this->MaChuongTrinh, $this->ThanhTien, $this->PIN, $Start, $Limit);
		}
		
		public function LayDanhSachTheoKhoa($MaKhoa)
		{
			$data = new hoadon_db();
			return $data->LayDanhSachTheoKhoa($MaKhoa, $this->MaHoaDon, $this->MaQuyenHoaDon, $this->MaNguoiDung, $this->MaHocVien, $this->NgayLap, $this->MaChuongTrinh, $this->PIN, $this->ThanhTien);
		}
		public function LayDanhSachTheoKhoaPaging($MaKhoa, $Start, $Limit)
		{
			$data = new hoadon_db();
			return $data->LayDanhSachTheoKhoaPaging($MaKhoa, $this->MaHoaDon, $this->MaQuyenHoaDon, $this->MaNguoiDung, $this->MaHocVien, $this->NgayLap, $this->MaChuongTrinh, $this->ThanhTien, $this->PIN, $Start, $Limit);
		}
	}

